﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using BSCMFF.Core;

namespace BSCMFF.Web.Pages.Evaluation_Setup
{
    public partial class EvaluationList : MultiLanguagePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
        {
            

            if (e.Item.ItemIndex != -1 && e.CommandName == "Edit" )
            {
                int id = Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ID"].ToString());
                Response.Redirect("EvaluationEditMode.aspx?EvaluationID=" + id + "&Command=" + e.CommandName);

            }
            if(e.CommandName == "InitInsert")
            {
                Response.Redirect("EvaluationEditMode.aspx?Command=" + e.CommandName);
            }

            if (e.Item.ItemIndex != -1 && e.CommandName == "Select")
            {
                int id = Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ID"].ToString());
                Response.Redirect("EvaluationFillingMode.aspx?EvaluationID=" + id.ToString());
            }
        }

        protected void btnNewEntry_Click(object sender, EventArgs e)
        {
            Response.Redirect("Evaluation.aspx");
            //Response.Write( "<script> window.open('pageName.aspx'); </script>");
            //Response.End();
        }
    }
}